package com.hichat.provider.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.hichat.common.pojo.Friend;
import com.hichat.common.pojo.FriendExample;

public interface FriendMapper {
    int countByExample(FriendExample example);

    int deleteByExample(FriendExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Friend record);

    int insertSelective(Friend record);

    List<Friend> selectByExample(FriendExample example);
    
    List<Friend> selectListByExample(FriendExample example);
    
    Friend selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Friend record, @Param("example") FriendExample example);

    int updateByExample(@Param("record") Friend record, @Param("example") FriendExample example);

    int updateByPrimaryKeySelective(Friend record);

    int updateByPrimaryKey(Friend record);

    List<Friend> getFriend(@Param("userId") Long userId, @Param("otherUserId") Long otherUserId, @Param("time") Date time);
    
    List<Friend> getFriendByFromAndTo(@Param("fromUserId") Long fromUserId, @Param("toUserId") Long toUserId);
    
    
}